home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1997
/
HAM Radio 1997.iso
/
vcls
/
clckdemo
/
gadgfrm.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-04-08
|
3KB
|
107 lines
unit Gadgfrm;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, VisApp, Feedback, Ledgadgt, Balloon, MMGadget, StdCtrls,
ExtCtrls;
type
TForm1 = class(TForm)
BalloonHint1: TBalloonHint;
LEDLabel1: TLEDLabel;
VisualApp1: TVisualApp;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
RotaryKnob1: TRotaryKnob;
PieMeter1: TPieMeter;
CheckBox3: TCheckBox;
Image1: TImage;
RadioGroup1: TRadioGroup;
NeatoMeter1: TNeatoMeter;
Image2: TImage;
RadioGroup2: TRadioGroup;
procedure RotaryKnob1Change(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure CheckBox2Click(Sender: TObject);
procedure CheckBox3Click(Sender: TObject);
procedure RadioGroup2Click(Sender: TObject);
procedure RadioGroup1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.RotaryKnob1Change(Sender: TObject);
begin
NeatoMeter1.Completed := RotaryKnob1.Position;
PieMeter1.Completed := RotaryKnob1.Position;
end;
procedure TForm1.CheckBox1Click(Sender: TObject);
begin
if CheckBox1.Checked then
LEDLabel1.UnlitColor := $00004000
else
LEDLabel1.UnlitColor := LEDLabel1.BackColor;
end;
procedure TForm1.CheckBox2Click(Sender: TObject);
var
s: String;
begin
if CheckBox2.Checked then
s := 'Hi!'
else
s := '';
NeatoMeter1.Caption := s;
PieMeter1.Caption := s;
end;
procedure TForm1.CheckBox3Click(Sender: TObject);
begin
NeatoMeter1.ShowPercent := CheckBox3.Checked;
PieMeter1.ShowPercent := CheckBox3.Checked;
end;
procedure TForm1.RadioGroup2Click(Sender: TObject);
begin
NeatoMeter1.Direction := TMeterDirection(RadioGroup2.ItemIndex);
end;
procedure TForm1.RadioGroup1Click(Sender: TObject);
begin
case RadioGroup1.ItemIndex of
0: NeatoMeter1.Bitmap := nil;
1:
begin
CheckBox2.Checked := False;
CheckBox3.Checked := False;
NeatoMeter1.Bitmap := Image2.Picture.Bitmap;
NeatoMeter1.BitmapDrawStyle := dsStretch;
end;
2:
begin
NeatoMeter1.Bitmap := Image1.Picture.Bitmap;
NeatoMeter1.BitmapDrawStyle := dsTile;
end;
3:
begin
NeatoMeter1.Bitmap := Image1.Picture.Bitmap;
NeatoMeter1.BitmapDrawStyle := dsTileInvert;
end;
end;
end;
end.